package com.cheer.ba.view.activity;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.cheer.ba.R;
import com.cheer.ba.utils.SystemUtils;
import com.cheer.ba.view.base.BaseCommAty;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 支付成功界面
 */
public class PaySuccessAty extends BaseCommAty {

    @BindView(R.id.id_root_view_liner)
    LinearLayout mLinearRoot;

    @Override
    public View loadView(LayoutInflater inflater, View childView) {
        return super.loadView(inflater, inflater.inflate(R.layout.aty_pay_success, null, false));
    }

    @Override
    public void initView() {
        int height = SystemUtils.getScreenHeight(aty);
        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, height / 2);
        mLinearRoot.setLayoutParams(params);
    }

    @OnClick({R.id.id_look_order_btn, R.id.id_finish_btn})
    public void onClick(View mView) {
        switch (mView.getId()) {
            case R.id.id_look_order_btn:
                if (isLogin(true)) {
                    showActivity(aty, MyOilCardAty.class);
                } else {
                    finish();
                }
                break;
            case R.id.id_finish_btn:
                finish();
                break;
        }
    }
}
